<?php
    header('Access-Control-Allow-Origin: *');
    header('Content-Type:text/html;charset=utf-8');
    // 连接数据库
    $con = mysqli_connect("127.0.0.1","root","root","mydb");
    $uId = $_GET['uId'];
    $classId = $_GET['classId'];
    $sql = "DELETE FROM lessonstu WHERE s_id = '$uId' AND l_id = '$classId';";
    $res = mysqli_query($con,$sql);
    if(mysqli_affected_rows($con) > 0){
        echo 'ok';
    }else{
        echo 'fail';
    }
    mysqli_close($con);
?>